package com.shenchuangit.webprintclient;

import com.shenchuangit.webprintclient.cycle.AbstractPrintJobPreHandler;
import com.shenchuangit.webprintclient.util.FileUtils;

import javax.servlet.http.HttpServletRequest;
import java.io.InputStream;

public class BarcodePrintJobPreHandler extends AbstractPrintJobPreHandler {


    @Override
    public void prePrint(HttpServletRequest request) {
        String fileUrl = request.getParameter("fileUrl");
        InputStream is = FileUtils.getRemoteFile(fileUrl);
        super.setFileToPrint(FileUtils.genFile(is));
    }
}
